From c5f55b4a8c195cc2b85aaf4d5fb173c3ac33d0b3 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 20 Jul 2004 20:51:13 +0000 Subject: [PATCH] (fill-comment-paragraph): Handle indent-tabs-mode. (fill-delete-newlines): Call sentence-end as function. (fill-nobreak-p, canonically-space-region): Likewise. (fill-nobreak-p): If this break point is at the end of the line, don't consider the newline which follows as a reason to return t. --- lisp/textmodes/fill.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index a888003402d..dfd471a87c4 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el @@ -353,7 +353,12 @@ and `fill-nobreak-invisible'." ;; Don't split a line if the rest would look like a new paragraph. (unless use-hard-newlines (save-excursion - (skip-chars-forward " \t") (looking-at paragraph-start))) + (skip-chars-forward " \t") + ;; If this break point is at the end of the line, + ;; which can occur for auto-fill, don't consider the newline + ;; which follows as a reason to return t. + (and (not (eolp)) + (looking-at paragraph-start)))) (run-hook-with-args-until-success 'fill-nobreak-predicate))))) ;; Put `fill-find-break-point-function' property to charsets which -- 2.30.2